package com.async.designpatterns.structure.adapter.object;

import com.async.designpatterns.structure.adapter.Adaptee;
import com.async.designpatterns.structure.adapter.Target;

/**
 * Created by wenzhuo on 2018/1/1.
 * 对象的适配器模式
 */
public class Wrapper implements Target {

    private Adaptee adaptee;

    public Wrapper(Adaptee adaptee){
        super();
        this.adaptee = adaptee;
    }

    @Override
    public void targetMethod1() {
        adaptee.targetMethod1();
    }

    @Override
    public void targetMethod2() {
        System.out.println("this is the tarhetable method!");
    }
}
